﻿// Version:1
// Author:Sanket Naik
// Date:July-21-2010 
// Comments:
// 
// 
// 


using System;
using System.Runtime.Serialization;
using ManagedServices.Common.DataTransferObject;


namespace ManagedServices.DataTransferObjects
{
    /// <summary>
    /// The Dto representing the Start Mode of a Service 
    /// </summary>
    [DataContract]
    public class MessageState : ICommonDto
    {
        /// <summary>
        /// The MessageState representing New
        /// </summary>
        public static readonly MessageState New = new MessageState(new Guid("2C98474E-16EF-461E-ACCC-C2F84D6D08FF"), "New", 1);

        /// <summary>
        /// The MessageState representing Notified
        /// </summary>
        public static readonly MessageState Notified = new MessageState(new Guid("06B869D2-1B21-4B64-B999-6EAA92AB37BA"), "Notified", 2);

        /// <summary>
        /// The MessageState representing Processed
        /// </summary>
        public static readonly MessageState Processed = new MessageState(new Guid("DE814055-50A4-4944-8E8A-F171010B360C"), "Processed", 3);

        /// <summary>
        /// The MessageState representing Stale
        /// </summary>
        public static readonly MessageState Stale = new MessageState(new Guid("A7B3AB0E-83BC-4912-BCF8-821219621528"), "Stale", 4);

        

        /// <summary>
        /// ctor
        /// </summary>
        /// <param name="startModeID"></param>
        /// <param name="name"></param>
        /// <param name="code"></param>
        public MessageState(Guid messageStateID, string name, short code)
        {
            MessageStateID = messageStateID;
            Name = name;
            Code = code;

            CreatedBy = Guid.Empty;
            ModifiedBy = Guid.Empty;
            CreatedOn = DateTime.Now;
            ModifiedOn = DateTime.Now;
        }

        /// <summary>
        /// The Guid representing the MessageState Uniquely
        /// </summary>
        [DataMember]
        public Guid MessageStateID { get; set; }

        /// <summary>
        /// The Name representing the MessageState Uniquely
        /// </summary>
        [DataMember]
        public string Name { get; set; }

        /// <summary>
        /// The integer representing the MessageState Uniquely
        /// </summary>
        [DataMember]
        public short Code { get; set; }

        /// <summary>
        /// Primary key for the DTO
        /// </summary>
        public Guid KeyId { get { return MessageStateID; } set { MessageStateID = value; } }

        /// <summary>
        /// Created by the User ID
        /// </summary>
        [DataMember]
        public Guid CreatedBy { get; set; }

        /// <summary>
        /// Created By User ID
        /// </summary>
        [DataMember]
        public Nullable<Guid> ModifiedBy { get; set; }

        /// <summary>
        /// Created On
        /// </summary>
        [DataMember]
        public DateTime CreatedOn { get; set; }

        /// <summary>
        /// Modified On
        /// </summary>
        [DataMember]
        public Nullable<DateTime> ModifiedOn { get; set; }
    }

}
